#pragma once

#ifndef _BITMAP_VIEWER_
#define _BITMAP_VIEWER_

#define BITMAPVIEWER_CLASSNAME    _T("MFCBitmapViewerCtrl")  // Window class name
#define BITMAPVIEWER_ID           1000

class CBitmapViewer : public CWnd
{
// Construction
public:
	CBitmapViewer(COLORREF crBackgnd);

// Attributes
public:
	virtual BOOL SetBitmap(CBitmap* pBitmap);

// Operations
public:
	BOOL Create(CWnd* pParentWnd, const RECT& rect, UINT nID = BITMAPVIEWER_ID, DWORD dwStyle = WS_VISIBLE);

private:
	COLORREF m_crBackgnd;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CBitmapViewer)
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CBitmapViewer();
protected:
    BOOL RegisterWindowClass();

protected:
	CBitmap* m_pBitmap;
	
	// Generated message map functions
protected:
	//{{AFX_MSG(CBitmapViewer)
	afx_msg void OnPaint();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif /* _BITMAP_VIEWER_ */